﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MovingLetters
{
    class Program
    {
        static void Main(string[] args)
        {
            string rawInput = Console.ReadLine();
            ////////////// This is slower but much shorter :) or maybe not//////////////////
            //StringBuilder[] sb = rawInput.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(m => new StringBuilder(m)).ToArray();
            //int totalLength = rawInput.Length - (sb.Length - 1);
            ////////////////////////////////////////////////
            int totalLength = rawInput.Replace(" ", "").Length;
            int spaceCount = rawInput.Length - totalLength;
            StringBuilder[] sb = new StringBuilder[spaceCount + 1];
            int startPos = 0;
            for (int i = 1; i <= spaceCount; i++)
            {
                int index = rawInput.IndexOf(' ', startPos);
                sb[i - 1] = new StringBuilder(rawInput.Substring(startPos, index - startPos));
                startPos = index + 1;
            }
            sb[spaceCount] = new StringBuilder(rawInput.Substring(startPos));


            StringBuilder stringToEncode = new StringBuilder();
            while (stringToEncode.Length < totalLength)
            {
                for (int i = 0; i < sb.Length; i++)
                {
                    if (sb[i].Length > 0)
                    {
                        stringToEncode.Append(sb[i][sb[i].Length - 1]);
                        sb[i].Remove(sb[i].Length - 1, 1);
                    }
                }
            }
            for (int i = 0; i < stringToEncode.Length; i++)
            {
                char charToMove = stringToEncode[i];
                int moveToPosition = 0;
                if (char.IsLower(charToMove))
                {
                    moveToPosition = (int)charToMove - 96;
                }
                else
                {
                    moveToPosition = (int)charToMove - 64;
                }
                moveToPosition = moveToPosition % stringToEncode.Length;
                moveToPosition = (moveToPosition + i) % stringToEncode.Length;
                stringToEncode.Remove(i, 1);
                stringToEncode.Insert(moveToPosition, charToMove);
            }
            Console.WriteLine(stringToEncode);
        }
    }
}